<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Javascript及JQuery快速入门</title>
<style type="text/css">
.myred{
	color:red;
}
</style>
<script src="../jquery3-3-1/jquery-3.3.1.js"></script>
<script type="text/javascript">
$(function(){
	$("#SumNum").click(function(){
		var a=$("#FirstNum").text();
		var b=$("#SecondNum").text();
		var c=parseInt(a)+parseInt(b);
		$("#SumNum").text(c);
		$("#SumNum").addClass("myred");		
	});
})
</script>
</head>
<body>
<h2>2018电商1班 18 张三</h2>
<div id="FirstNum">1</div>
<div id="SecondNum">2</div>
<div id="SumNum">?</div>
</body>
</html>
